#include "HttpServer.hpp"
#include <string>
#include <memory>
#include <ctime>
#include "Log.hpp"


void Usage(std::string proc)
{
    std::cout << "Usage:" << proc << " port" << std::endl;
}

int main(int argc,char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(-1);
    }
    uint16_t port = atoi(argv[1]);
    std::shared_ptr<HttpServer> http_server(new HttpServer);
    http_server->InitServer();
    LOG(INFO,"InitServer success!");
    http_server->Loop();
    return 0;
}